package com.example.demo.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.context.annotation.Bean;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @Project:demo
 * @Description: 员工排班实体类
 * @Author: Mr.Hunter
 * @Date:2023/3/25/18:39
 */
@Service
@Component
@Entity
@Data
@IdClass(ShiftPrimaryKey.class)
@Table(name = "Shift")
public class Shift implements Serializable {
    @Id
//    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer storeId;//店铺id
    @Id
//    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer staffId;//员工id

//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")@DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Temporal(TemporalType.DATE)
    @Column
    private Date workDate;//工作日期

    private String shiftScheduling;//员工排班




}